/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jesseenglish.swingftfy.extensions;

import java.awt.Font;
import javax.swing.Icon;
import javax.swing.JLabel;

/**
 *
 * @author english1
 */
public class FLabel extends JLabel {

    public FLabel() {
        super();
    }

    public FLabel(Icon icon) {
        super(icon);
    }

    public FLabel(String string) {
        super(string);
    }

    public FLabel(Icon icon, int i) {
        super(icon, i);
    }

    public FLabel(String string, int i) {
        super(string, i);
    }

    public FLabel(String string, Icon icon, int i) {
        super(string, icon, i);
    }

    public void setBold(boolean bold) {
        if (bold) {
            Font newLabelFont = new Font(getFont().getName(), Font.BOLD, getFont().getSize());
            this.setFont(newLabelFont);
        } else {
            Font newLabelFont = new Font(getFont().getName(), Font.PLAIN, getFont().getSize());
            this.setFont(newLabelFont);
        }

        this.validate();
        this.repaint();
    }

}
